package com.anlu.concurrent.ch3;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * <p>
 * Description:TODO 详细描述
 * <p>
 * Copyright: 天津联想协同科技有限公司
 * <p>
 *
 * @author anlu
 * @date 2021/9/7 15:22
 */
public class UseAtomicInt {
    static AtomicInteger ai = new AtomicInteger(10);

    public static void main(String[] args) {
        System.out.println(ai.getAndIncrement());
        System.out.println(ai.getAndIncrement());
        System.out.println(ai.get());
    }
}
